// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * CatalogruleProductPrice generated by hbm2java
 */
@Entity
@Table(name = "catalogrule_product_price", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = {
		"rule_date", "website_id", "customer_group_id", "product_id" }))
public class CatalogruleProductPrice implements java.io.Serializable {

	private Integer ruleProductPriceId;
	private CoreWebsite coreWebsite;
	private CustomerGroup customerGroup;
	private CatalogProductEntity catalogProductEntity;
	private Date ruleDate;
	private BigDecimal rulePrice;
	private Date latestStartDate;
	private Date earliestEndDate;

	public CatalogruleProductPrice() {
	}

	public CatalogruleProductPrice(CoreWebsite coreWebsite,
			CustomerGroup customerGroup,
			CatalogProductEntity catalogProductEntity, Date ruleDate,
			BigDecimal rulePrice) {
		this.coreWebsite = coreWebsite;
		this.customerGroup = customerGroup;
		this.catalogProductEntity = catalogProductEntity;
		this.ruleDate = ruleDate;
		this.rulePrice = rulePrice;
	}

	public CatalogruleProductPrice(CoreWebsite coreWebsite,
			CustomerGroup customerGroup,
			CatalogProductEntity catalogProductEntity, Date ruleDate,
			BigDecimal rulePrice, Date latestStartDate, Date earliestEndDate) {
		this.coreWebsite = coreWebsite;
		this.customerGroup = customerGroup;
		this.catalogProductEntity = catalogProductEntity;
		this.ruleDate = ruleDate;
		this.rulePrice = rulePrice;
		this.latestStartDate = latestStartDate;
		this.earliestEndDate = earliestEndDate;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "rule_product_price_id", unique = true, nullable = false)
	public Integer getRuleProductPriceId() {
		return this.ruleProductPriceId;
	}

	public void setRuleProductPriceId(Integer ruleProductPriceId) {
		this.ruleProductPriceId = ruleProductPriceId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "website_id", nullable = false)
	public CoreWebsite getCoreWebsite() {
		return this.coreWebsite;
	}

	public void setCoreWebsite(CoreWebsite coreWebsite) {
		this.coreWebsite = coreWebsite;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_group_id", nullable = false)
	public CustomerGroup getCustomerGroup() {
		return this.customerGroup;
	}

	public void setCustomerGroup(CustomerGroup customerGroup) {
		this.customerGroup = customerGroup;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id", nullable = false)
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "rule_date", nullable = false, length = 10)
	public Date getRuleDate() {
		return this.ruleDate;
	}

	public void setRuleDate(Date ruleDate) {
		this.ruleDate = ruleDate;
	}

	@Column(name = "rule_price", nullable = false, precision = 12, scale = 4)
	public BigDecimal getRulePrice() {
		return this.rulePrice;
	}

	public void setRulePrice(BigDecimal rulePrice) {
		this.rulePrice = rulePrice;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "latest_start_date", length = 10)
	public Date getLatestStartDate() {
		return this.latestStartDate;
	}

	public void setLatestStartDate(Date latestStartDate) {
		this.latestStartDate = latestStartDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "earliest_end_date", length = 10)
	public Date getEarliestEndDate() {
		return this.earliestEndDate;
	}

	public void setEarliestEndDate(Date earliestEndDate) {
		this.earliestEndDate = earliestEndDate;
	}

}
